/*
 * Copyright (C) 2008 Rob Cash
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * 	http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.robcash.commons.swing.wizard;

import javax.swing.Icon;
import javax.swing.JDialog;
import org.robcash.commons.swing.wizard.event.WizardPanelListener;
import org.robcash.commons.swing.wizard.model.WizardModel;

/**
 * A wizard can be used to implement a series of steps through which the user
 * must navigate using "previous" and "next" buttons. It consists of 1 or more
 * panels, each of which contains a user interface.
 * @author Rob
 */
public interface Wizard {

    /**
     * OK Status
     */
    public final static int STATUS_FINISH = 1;

    /**
     * Cancel Status
     */
    public final static int STATUS_CANCEL = 0;
    
    /**
     * Get the model associated with this wizard
     * @return Wizard model
     */
    public WizardModel getModel();

    /**
     * Get the dialog in which the wizard is displayed
     * @return Dialog
     */
    public JDialog getDialog();

    /**
     * Get the title of the Wizard. This is a convenience method that gets the
     * title from the dialog.
     * @return Wizard title
     */
    public String getTitle();

    /**
     * Set the title of the wizard. This is a convenience method that sets the
     * title on the dialog.
     * @param title Wizard title
     */
    public void setTitle(String title);

    /**
     * Get the value of cancelButtonIcon
     * @return the value of cancelButtonIcon
     */
    public Icon getCancelButtonIcon();

    /**
     * Get the value of prevButtonIcon
     * @return the value of prevButtonIcon
     */
    public Icon getPrevButtonIcon();

    /**
     * Get the value of nextButtonIcon
     * @return the value of nextButtonIcon
     */
    public Icon getNextButtonIcon();

    /**
     * Get the value of finishButtonIcon
     * @return the value of finishButtonIcon
     */
    public Icon getFinishButtonIcon();

    /**
     * Get the value of cancelButtonText
     * @return the value of cancelButtonText
     */
    public String getCancelButtonText();

    /**
     * Get the value of prevButtonText
     * @return the value of prevButtonText
     */
    public String getPrevButtonText();

    /**
     * Get the value of nextButtonText
     * @return the value of nextButtonText
     */
    public String getNextButtonText();

    /**
     * Get the value of finishButtonText
     * @return the value of finishButtonText
     */
    public String getFinishButtonText();

    /**
     * Show the dialog
     * @return return status
     */
    public int showDialog();

    /**
     * Get return status
     * @return Status to indicate if user exited out of dialog with a finish or
     * cancel status
     */
    public int getReturnStatus();

}
